package cn.changeforyou.web.cloud.blog.exception;

import cn.changeforyou.base.exception.ErrorInfo;
import cn.changeforyou.base.model.Module;

public enum BlogExceptionEnum implements ErrorInfo {

    NOT_FOUND_USER(2, "用户不存在"),
    ;

    BlogExceptionEnum(int unitCode, String message) {
        this.unitCode = unitCode;
        this.message = message;
    }

    private final int unitCode;
    private final String message;

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public Module getModule() {
        return Module.BLOG_SERVICE;
    }

    @Override
    public int unitCode() {
        return unitCode;
    }

}
